1. Field of the Invention
The present invention relates to the field of data processing, and more particularly to the overlaying of images on a display output device.
2. Art Background
Modern data processing systems generally provide visual output by way of such output devices as cathode ray tubes or liquid crystal displays. The performance of such systems can be enhanced when the visual display receives information from more than one source, and overlays the information received from a first source (default) with the information received from a second source (overlay). The overlaying of such information can be especially useful where only a portion of the default information is hidden by the overlay information. For example, a computer system typically includes a graphics subsystem that provides background graphics, such as windows, on a rasterized computer display. A separate video subsystem of the computer, typically residing on a video card, may provide video information, such as a motion video image, which overlays the inside of the window to serve as the contents of the window. The mixed result is displayed on a display monitor.
A number of techniques can be used to overlay images. FIG. 1 is a simplified block diagram of a video mixing system in which an overlay signal from a first source 100 is mixed in a mixing or blending circuit 102 with a default or background signal from a second source 104. The mixed result is displayed on a display 106. The mixer 102 may be implemented as a digital mixer, which mixes the digital outputs of the sources 100 and 104 and then converts the composite result to an analog signal for display. Alternatively, the mixer 102 may be an analog mixer mixing analog signals from the sources 100 and 104.
FIG. 2 illustrates a simple current summing approach to analog mixing. The overlay source 100 and the default source 104 are each implemented as high impedance current sources providing display signals that are merged into a current summing node 200 to provide a common current signal to drive the display monitor 106. As an example, assume that a graphics card acts as the source 104 to output a window frame through the current summing node 200 to the display monitor 106. The graphics card 104 includes a graphics controller (not shown) and a graphics frame buffer (not shown) that digitally stores both the window frame image as well as a black (zero current or low current) color within the window frame. It also contains a digital-to-analog converter (DAC) with a high impedance output characteristic which is used to convert the digitally stored image into an analog current signal. The overlay video source 100 similarly employs a video controller, a video frame buffer, and a high impedance DAC. The video source 100 is synchronized with the graphics card 104 so that the intended overlay video contents of the window are output from the video source 100 at a raster position that corresponds to the interior of the window frame stored in the graphics frame buffer, and so that black (zero current or low current) is output from the video source 100 everywhere else within the raster. Using this method, the current outputs of the two DACs simply sum together to drive the display monitor. Because a black color is represented by a zero current or very low current output from either DAC, the addition of a non-black color from either source to the black color from the other source results in a current sum that represents only the non-black color.
The current summing merge suffers from a number of drawbacks. For one, assume that an arbitrarily shaped graphics object is desired to be drawn by the graphics source 104 to mask the overlay image, for example, when drawing a caption, pull-down menu, or other useful shapes on top of the image produced by the video source 100. In this case, special means must be provided in the video source 100 to guarantee that its output will be black wherever the graphics source 104 image is drawn. Otherwise, the two overlapping images will add together, producing undesired results. Such means tend to be complex for arbitrary images.
A second problem is similar, but occurs when a window frame is moved, perhaps by being dragged by the user using a mouse input device. As the window frame is moved, both the graphics source 104 and the overlay source 100 must be updated (typically by software either re-drawing images in the frame buffers, or modifying registers which control window characteristics) with the new position of the graphics window image. This maintains alignment of the two images, so that the video contents of the window remain within the window frame as the window is dragged. In many software environments there is a considerable delay between updating the graphics source 104 and the video source 100. During this interim period, the user will see the window frame image move but the overlay image will continue playing in the old location for a while. The two non-aligned images overlap and sum, creating undesired colors on the display monitor.
In order to eliminate or reduce side effects from these problems, switched video merging techniques have been developed, often based on recognizing a special key color to trigger the switch from the graphics source to the video source. FIG. 3 illustrates a display system implementing switched video merging. As an example, assume that a graphics card acts as the default source 104, and a video card acts as the overlay source 100, as in the previous example. However, in this case, only one source is selected at any instant, by a multiplexer (MUX) 300 to actually drive the display monitor. The graphics card 104 stores both the window frame image as well as a recognizable key color (not necessarily black) within the window frame. A key color detection circuit 302 senses the key color output from the graphics card 104, and switches the MUX 300 to select the video overlay signal when the key color is output from the graphics card 104. Using this approach, the video image is overlaid on the graphics background through synchronized switching between the video and graphics sources. In addition, arbitrary graphics shapes may be drawn by the graphics source 104 to selectively mask the overlay video with display graphics images without complex means within the overlay source itself.
The switched video merging technique of FIG. 3 suffers from the need to include high speed switching components in the signal path between the sources and the display monitor. Any such components necessarily degrade the original signal somewhat, either by introducing distortion due to impedance non-linearities, by blurring due to the low-pass filtering effect of limited bandwidth components, or by other artifacts. In addition, the switching speed of the MUX 300 must be fast enough to accommodate rapid changes in the display between default and overlay pixels. A computer display may be as large as 1,024 by 768 pixels or larger and operate at a frame rate on the order of 70 or more flames per second. Under these circumstances, the MUX 300 may require a switching frequency on the order of 100 MHz, because switching delays of 10 nsec will shift the intended switchover position by a full pixel or more. Such fast switches are expensive and difficult to implement.
FIG. 4 illustrates a video merging technique which uses a current summing technique, combined with a color key technique. Current summing eliminates the need for switches in the image signal paths. Further, key detection enables arbitrary masking graphics and minimizes the undesired side effects due to system update delays and other causes. As shown in FIG. 4, default and overlay signals from the default source 400 and the overlay signal source 402, respectively, are summed into a current summing node 404 for output to the display (not shown). A key color (typically black) that is output from the default source 400 indicates those areas of the display in which the overlay signal is to be applied. The system includes a key detection circuit 406 for detecting when the default source 400 outputs the key color. In response to detecting the key color, the key detection circuit 406 enables the overlay source 402 to output the overlay image. This may preferably be done by enabling an output DAC in the overlay source 402 by employing an enabling signal (such as that used in the Intel 82750DB video output controller chip) or other means. This avoids the need for a switch in the overlay source analog signal path. Because a black key color is represented by a zero-current or low-current default signal, the addition of a non-zero overlay signal with the zero-current key color in the current summing node 404 results in a current sum that represents only the overlay image.
Note that a current summing key detection system such as that of FIG. 4 requires a buffer 408 to isolate the default signal from the overlay signal. Without the buffer, because the two signals are summed, the default signal could not be detected independently from the overlay source. Thus, without the buffer, the key detection logic 406 would be unable to determine whether the default source 400 is generating the key color signal. In fact, assuming black detect as an example, as soon as the overlay is turned on and outputs a non-black color, the key detection circuit 406 would turn it off again.
One problem with the key color approach of FIG. 4 is the limited bandwidth of the buffer 408. Because of the high spatial frequency of the typical video display, the default signal source 400 must output a correspondingly high frequency signal to the buffer 408. Most buffers do not have sufficient bandwidth to handle such video signals. This causes the buffer 408 to act as a low pass filter, resulting in smearing and blurring of the default image on the display.
Ideally, no buffers or any other device should be interposed in the connection between the signal sources and the display. Any buffering or amplification will necessarily cause some distortion or noise due to bandwidth limitations and non-linearities. Linear, high bandwidth devices are expensive and difficult to find.